﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Innovox.NetTools
{
    public class CancellationSource
    {
        private volatile bool _requestCancel;

        public CancellationSource()
        {
            _requestCancel = false;
        }

        public void RequestCancellation()
        {
            _requestCancel = true;
        }

        public void AbortCancellation()
        {
            _requestCancel = false;
        }

        public bool IsCancelRequest { get { return _requestCancel; } }
    }
}
